<template>
	<view class="ss-flex-col ss-col-center">
		<view v-if="list.length == 0 && status == 'nomore'" class="ss-flex-col">
			<z-empty :text="text" :marginTop="marginTop"></z-empty>
			<uv-gap height="15"></uv-gap>
		</view>
		<!-- <uv-gap height="10"></uv-gap> -->
		<uv-load-more :fontSize="fontSize" :color="color" :line="line" v-if="status == 'loading' || status == 'loadmore' || (list.length !== 0 && status == 'nomore')" @loadmore="loadmore" :status="status" :loading-text="loadingText" :loadmore-text="loadmoreText" :nomore-text="nomoreText" />	
	</view>
</template>

<script setup>
	defineProps({
		status:{
			type:String,
			default:'nomore',			
		},
		loadingText:{
			type:String,
			default:'努力加载中',	
		},
		loadmoreText:{
			type:String,
			default:'上拉或者点击加载更多',	
		},
		nomoreText:{
			type:String,
			default:'已经到底了',	
		},
		marginTop:{
			type:String,
			default:'116rpx'	
		},
		list:{
			type:Array,
			default: () => []
		},
		text:{
			type:String,
			default:'暂无数据'
		},
		line:{
			type:Boolean,
			default:true
		},
		fontSize:{
			type:String,
			default:'22rpx'
		},
		color:{
			type:String,
			default:'#ccc'
		}
	})
	const emit = defineEmits(['loadmore'])
	function loadmore(){
		emit('loadmore')
	}
</script>

<style>

</style>